# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pyee
pkgver=11.1.0
pkgrel=1
pkgdesc="A port of node.js's EventEmitter to Python"
url="https://github.com/jfhbrook/pyee"
arch="noarch"
license="MIT"
depends="
	py3-async_generator
	py3-trio
	py3-twisted
	py3-vcversioner
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-mock
	py3-pytest-asyncio
	py3-pytest-trio
	pytest
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/p/pyee/pyee-$pkgver.tar.gz"
builddir="$srcdir/pyee-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
86dd34b6d353be9c01a84cbe7cfbdc70eb8ad75626bfde48d0c7d9b027650df3c51edc8c002b6d011a51868b0ad92b6b44e34618f20861313899221730130f16  pyee-11.1.0.tar.gz
"
